import 'dart:convert';

import 'package:flutter_app_study/bean/serial_number_entity.dart';

class DataUtil {
  static SerialNumberEntity getSerialNumber() {
    SerialNumberEntity entity = SerialNumberEntity();
    entity.data = [];
    for (var i = 0; i < 10; ++i) {
      var serialNumberData = SerialNumberData();
      serialNumberData.type = "a";
      serialNumberData.content = "content$i";
      entity.data.add(serialNumberData);
    }
    for (var i = 10; i < 20; ++i) {
      var serialNumberData = SerialNumberData();
      serialNumberData.type = "b";
      serialNumberData.content = "content$i";
      entity.data.add(serialNumberData);
    }
    for (var i = 20; i < 30; ++i) {
      var serialNumberData = SerialNumberData();
      serialNumberData.type = "c";
      serialNumberData.content = "content$i";
      entity.data.add(serialNumberData);
    }
    for (var i = 30; i < 40; ++i) {
      var serialNumberData = SerialNumberData();
      serialNumberData.type = "d";
      serialNumberData.content = "content$i";
      entity.data.add(serialNumberData);
    }
    String encode = json.encode(entity);
//    print(encode);
  }

  


}
